<?php
ini_set("display_errors", "On");
error_reporting(E_ALL | E_STRICT);
include 'config.php';
$mysqli = new mysqli($dbhost, $dbuser, $dbpwd, $dbName);
if (!$mysqli->set_charset("utf8")) {}

$theAllData=array();


$theAllData['2020-10-12']=array('pv'=>'9','uv'=>'6',
    'newuv'=>'2','share'=>'1'
);
$theAllData['2020-10-11']=array('pv'=>'0','uv'=>'0',
    'newuv'=>'0','share'=>'0'
);
$theAllData['2020-10-10']=array('pv'=>'5','uv'=>'4',
    'newuv'=>'2','share'=>'1'
);
$theAllData['2020-10-09']=array('pv'=>'16','uv'=>'7',
    'newuv'=>'3','share'=>'0'
);
$theAllData['2020-10-08']=array('pv'=>'1','uv'=>'1',
    'newuv'=>'0','share'=>'0'
);
$theAllData['2020-10-07']=array('pv'=>'0','uv'=>'0',
    'newuv'=>'0','share'=>'0'
);
$theAllData['2020-10-06']=array('pv'=>'3','uv'=>'2',
    'newuv'=>'1','share'=>'0'
);
$theAllData['2020-10-05']=array('pv'=>'3','uv'=>'3',
    'newuv'=>'1','share'=>'0'
);
$theAllData['2020-10-04']=array('pv'=>'0','uv'=>'0',
    'newuv'=>'0','share'=>'0'
);
$theAllData['2020-10-03']=array('pv'=>'1','uv'=>'1',
    'newuv'=>'1','share'=>'1'
);
$theAllData['2020-10-02']=array('pv'=>'3','uv'=>'2',
    'newuv'=>'1','share'=>'0'
);
$theAllData['2020-10-01']=array('pv'=>'10','uv'=>'8',
    'newuv'=>'5','share'=>'1'
);
$theAllData['2020-09-30']=array('pv'=>'13','uv'=>'8',
    'newuv'=>'4','share'=>'1'
);
$theAllData['2020-09-29']=array('pv'=>'24','uv'=>'14',
    'newuv'=>'7','share'=>'1'
);
$theAllData['2020-09-28']=array('pv'=>'5','uv'=>'3',
    'newuv'=>'2','share'=>'0'
);
$theAllData['2020-09-27']=array('pv'=>'4','uv'=>'3',
    'newuv'=>'1','share'=>'0'
);
$theAllData['2020-09-26']=array('pv'=>'3','uv'=>'3',
    'newuv'=>'2','share'=>'1'
);
$theAllData['2020-09-25']=array('pv'=>'5','uv'=>'5',
    'newuv'=>'1','share'=>'0'
);
$theAllData['2020-09-24']=array('pv'=>'7','uv'=>'6',
    'newuv'=>'3','share'=>'0'
);
$theAllData['2020-09-23']=array('pv'=>'42','uv'=>'21',
    'newuv'=>'8','share'=>'0'
);
$theAllData['2020-09-22']=array('pv'=>'18','uv'=>'15',
    'newuv'=>'4','share'=>'0'
);
$theAllData['2020-09-21']=array('pv'=>'62','uv'=>'51',
    'newuv'=>'33','share'=>'1'
);
$theAllData['2020-09-20']=array('pv'=>'143','uv'=>'93',
    'newuv'=>'52','share'=>'0'
);
$theAllData['2020-09-19']=array('pv'=>'167','uv'=>'105',
    'newuv'=>'56','share'=>'4'
);
$theAllData['2020-09-18']=array('pv'=>'137','uv'=>'88',
    'newuv'=>'39','share'=>'7'
);
$theAllData['2020-09-17']=array('pv'=>'133','uv'=>'90',
    'newuv'=>'42','share'=>'3'
);
$theAllData['2020-09-16']=array('pv'=>'131','uv'=>'78',
    'newuv'=>'40','share'=>'6'
);
$theAllData['2020-09-15']=array('pv'=>'319','uv'=>'210',
    'newuv'=>'102','share'=>'9'
);
$theAllData['2020-09-14']=array('pv'=>'294','uv'=>'186',
    'newuv'=>'86','share'=>'5'
);
$theAllData['2020-09-13']=array('pv'=>'227','uv'=>'174',
    'newuv'=>'89','share'=>'8'
);


$theAllData['2020-09-12']=array('pv'=>'414','uv'=>'288',
    'newuv'=>'148','share'=>'10'
);
//new uv 新用户数
$theAllData['2020-09-10']=array('pv'=>'311','uv'=>'68',
    'newuv'=>'34','share'=>'7'
);
$theAllData['2020-09-11']=array('pv'=>'545','uv'=>'285',
    'newuv'=>'138','share'=>'21'
);










foreach ($theAllData as $k=>$v){
    $mysqli->query("update tongj set pv_uv_share='".json_encode($v)."' where theday='".$k."' ");
 
}
$mysqli->close();

echo 'done';





